//
//  RMMShopingConfirmTableViewCell.m
//  Romomo
//
//  Created by puman on 16/10/10.
//  Copyright © 2016年 mazegong. All rights reserved.
//

#import "RMMShopingConfirmTableViewCell.h"

@implementation RMMShopingConfirmTableViewCell
{
    UIImageView *_imageV;
    UILabel *_titleLabel;
    UILabel *_priceLabel;
    UILabel *_countLabel;
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _imageV = [[UIImageView alloc] initWithFrame:CGRectMake(15, 12, 75, 75)];
        _imageV.layer.masksToBounds = YES;
        _imageV.layer.cornerRadius = 5;
        [self.contentView addSubview:_imageV];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(_imageV.right + 12, _imageV.top, kScreenWideth - _imageV.right - 27, kMaric)];
        _titleLabel.font = kFont(16);
        _titleLabel.textColor = COLORFROMCODE(0x303137, 1);
        [self.contentView addSubview:_titleLabel];
        
        _priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(_titleLabel.left , _imageV.bottom - kMaric, 100, kMaric)];
        _priceLabel.font = kBFont(18);
        _priceLabel.textColor = COLORFROMCODE(0x303137, 1);
        [self.contentView addSubview:_priceLabel];
        
        _countLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWideth - 80, _priceLabel.top, 65, kMaric)];
        _countLabel.textAlignment = NSTextAlignmentRight;
        _countLabel.font = kFont(13);
        _countLabel.textColor = COLORFROMCODE(0xA0A5A7, 1);
        [self.contentView addSubview:_countLabel];
 
    }
    return self;
}
- (void)setModel:(RMMShopingModel *)model{
    _titleLabel.text = model.SERVICE_NAME;
    [_imageV sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",kBaseImageUrl,model.IMAGEURL]] placeholderImage:[UIImage imageNamed:@"加载中@3x"]];
    _priceLabel.text = [NSString stringWithFormat:@"¥ %@",model.PRICE ];
    _countLabel.text = [NSString stringWithFormat:@"x%@",model.COUNT];

}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
